package com.hqyj.dao;

import com.hqyj.pojo.Leavess;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.data.repository.query.Param;

/**
 * <p>
 * 差假表 Mapper 接口
 * </p>
 *
 * @author rock
 * @since 2021-11-23
 */
public interface LeavessMapper extends BaseMapper<Leavess> {
    @Select("SELECT COUNT(*) FROM leavess WHERE leave_state=0")
    Integer queryLeavess();

    @Select("SELECT COUNT(*) FROM leavess WHERE sys_id=#{sysId} AND leave_state!=0")
    Integer queryLeavessBySysId(@Param("sysId")Integer sysId);

}
